<?php if ($this->categories) : ?>
<div class="b_breadcrumb b_bottom">
		<div style="float:left;">
			<a href="<?php echo $this->baseUrl(); ?><?php echo $this->lang; ?>"><?php echo $this->translator()->widget('home'); ?></a>
		</div>
        <?php foreach ($this->categories as $index => $category) : 
			$conn = Tomato_Db_Connection::factory()->getSlaveConnection();
			$articleDao = Tomato_Model_Dao_Factory::getInstance()->setModule('news')->getArticleDao();
			$articleDao->setDbConnection($conn);
			$exp  = array('category_id'=>$category->category_id);
			$count 	    = $articleDao->count($exp);			
		?>
			<div style="float:left;">
				&nbsp;»&nbsp;<a href="<?php if($count>0) echo $this->url($category->getProperties(), 'news_article_category'); else echo 'javascript: void(0);';?> "><?php echo $category->name.' ('.$count.')'; ?></a>
			</div>
        <?php endforeach; ?>
</div>
<?php endif; ?>